Use G_VALUE_INIT
authorJavier Jardón <jjardon@gnome.org>
Fri, 30 Sep 2011 15:31:04 +0000 (16:31 +0100)
committerJavier Jardón <jjardon@gnome.org>
Sat, 15 Oct 2011 15:45:16 +0000 (16:45 +0100)
Instead of an explicit { 0, } when declaring the variable.

30 files changed:
demos/gtk-demo/main.c
gdk/x11/gdkscreen-x11.c
gtk/a11y/gtkcomboboxaccessible.c
gtk/a11y/gtktreeviewaccessible.c
gtk/gtkbindings.c
gtk/gtkcellarea.c
gtk/gtkcelllayout.c
gtk/gtkcellview.c
gtk/gtkcontainer.c
gtk/gtklabel.c
gtk/gtkliststore.c
gtk/gtkmodules.c
gtk/gtkscale.c
gtk/gtkscalebutton.c
gtk/gtksettings.c
gtk/gtkstyleproperties.c
gtk/gtkstyleproperty.c
gtk/gtktextbufferserialize.c
gtk/gtktreedatalist.c
gtk/gtktreemodel.c
gtk/gtktreemodelfilter.c
gtk/gtktreestore.c
gtk/gtktreeview.c
gtk/tests/builder.c
gtk/tests/defaultvalue.c
gtk/tests/object.c
tests/a11y/accessibility-dump.c
tests/prop-editor.c
tests/testgtk.c
tests/testmerge.c

index 4406c71bdccb60da467f95b2a0847780fae1af5e..19c32c9e188418d2d501a75d6c4f69847304078b 100644 (file)
@@ -711,7 +711,7 @@ selection_cb (GtkTreeSelection *selection,
               GtkTreeModel     *model)
 {
   GtkTreeIter iter;
-  GValue value = {0, };
+  GValue value = G_VALUE_INIT;
 
   if (! gtk_tree_selection_get_selected (selection, NULL, &iter))
     return;
index 64e488f6d1b276d4dbe941cd484d573e4cd28ee5..97e363ab8117a62954aa97bd83812a04acaa9aca 100644 (file)
@@ -1117,7 +1117,7 @@ gdk_x11_screen_get_setting (GdkScreen   *screen,
   GdkX11Screen *x11_screen;
   gboolean success = FALSE;
   gint i;
-  GValue tmp_val = { 0, };
+  GValue tmp_val = G_VALUE_INIT;
 
   g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
 
index f25f787a7a9afe6efd017ca9d7f47f6468732e5c..aacf35ad14468500138a019a0775fb22d4668d00 100644 (file)
@@ -117,7 +117,7 @@ gtk_combo_box_accessible_get_name (AtkObject *obj)
       n_columns = gtk_tree_model_get_n_columns (model);
       for (i = 0; i < n_columns; i++)
         {
-          GValue value = { 0, };
+          GValue value = G_VALUE_INIT;
 
           gtk_tree_model_get_value (model, &iter, i, &value);
           if (G_VALUE_HOLDS_STRING (&value))
index 616ce5a5a3bfe74a78f6939594a4ca1590f95951..f78f37621afc761a62e56f1f6c47b69b0560bace 100644 (file)
@@ -2442,7 +2442,7 @@ update_cell_value (GtkRendererCellAccessible      *renderer_cell,
 
           if (spec != NULL)
             {
-              GValue value = { 0, };
+              GValue value = G_VALUE_INIT;
 
               g_value_init (&value, spec->value_type);
               g_object_get_property (cur_renderer->data, *prop_list, &value);
index 9b2e67b4bd4e670ad747f5bd59d997582d2db56a..5c5144cb9be35d109fcb9a9a38b4de44175b9e78 100644 (file)
@@ -479,7 +479,7 @@ binding_compose_params (GObject         *object,
   valid = TRUE;
   for (i = 1; i < query->n_params + 1 && valid; i++)
     {
-      GValue tmp_value = { 0, };
+      GValue tmp_value = G_VALUE_INIT;
 
       g_value_init (params, *types);
 
@@ -602,7 +602,7 @@ gtk_binding_entry_activate (GtkBindingEntry *entry,
       GSignalQuery query;
       guint signal_id;
       GValue *params = NULL;
-      GValue return_val = { 0, };
+      GValue return_val = G_VALUE_INIT;
       gchar *accelerator = NULL;
 
       signal_id = g_signal_lookup (sig->signal_name, G_OBJECT_TYPE (object));
index 9764448cba6ec003d7069e2c14b1786f70995c95..bb805ee3eae4c40f3276adae890219bc0fca3539 100644 (file)
@@ -1250,7 +1250,7 @@ apply_cell_attributes (GtkCellRenderer *renderer,
 {
   CellAttribute *attribute;
   GSList        *list;
-  GValue         value = { 0, };
+  GValue         value = G_VALUE_INIT;
   gboolean       is_expander;
   gboolean       is_expanded;
 
@@ -2602,7 +2602,7 @@ area_set_cell_property (GtkCellArea     *area,
                         GParamSpec      *pspec,
                         const GValue    *value)
 {
-  GValue tmp_value = { 0, };
+  GValue tmp_value = G_VALUE_INIT;
   GtkCellAreaClass *class = g_type_class_peek (pspec->owner_type);
 
   /* provide a copy to work from, convert (if necessary) and validate */
@@ -2656,7 +2656,7 @@ gtk_cell_area_cell_set_valist (GtkCellArea        *area,
   name = first_property_name;
   while (name)
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       gchar *error = NULL;
       GParamSpec *pspec =
         g_param_spec_pool_lookup (cell_property_pool, name,
@@ -2718,7 +2718,7 @@ gtk_cell_area_cell_get_valist (GtkCellArea        *area,
   name = first_property_name;
   while (name)
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       GParamSpec *pspec;
       gchar *error;
 
@@ -2824,7 +2824,7 @@ gtk_cell_area_cell_get_property (GtkCellArea        *area,
                G_STRLOC, pspec->name, G_OBJECT_TYPE_NAME (area));
   else
     {
-      GValue *prop_value, tmp_value = { 0, };
+      GValue *prop_value, tmp_value = G_VALUE_INIT;
 
       /* auto-conversion of the callers value type
        */
index d3870a05263dee62c97afbd563f895b1ccb2b811..248acea95ce077beee4b669affb49e54d7ee33e1 100644 (file)
@@ -711,7 +711,7 @@ gtk_cell_layout_buildable_set_cell_property (GtkCellArea     *area,
                                             const gchar     *value)
 {
   GParamSpec *pspec;
-  GValue gvalue = { 0, };
+  GValue gvalue = G_VALUE_INIT;
   GError *error = NULL;
 
   pspec = gtk_cell_area_class_find_cell_property (GTK_CELL_AREA_GET_CLASS (area), name);
index 09e583f732de7801cdf092869e01b8308d0ea148..3299eb2afd08a7899d135b37b094853387138740 100644 (file)
@@ -987,7 +987,7 @@ gtk_cell_view_new_with_text (const gchar *text)
 {
   GtkCellView *cellview;
   GtkCellRenderer *renderer;
-  GValue value = {0, };
+  GValue value = G_VALUE_INIT;
 
   cellview = GTK_CELL_VIEW (gtk_cell_view_new ());
 
@@ -1021,7 +1021,7 @@ gtk_cell_view_new_with_markup (const gchar *markup)
 {
   GtkCellView *cellview;
   GtkCellRenderer *renderer;
-  GValue value = {0, };
+  GValue value = G_VALUE_INIT;
 
   cellview = GTK_CELL_VIEW (gtk_cell_view_new ());
 
@@ -1053,7 +1053,7 @@ gtk_cell_view_new_with_pixbuf (GdkPixbuf *pixbuf)
 {
   GtkCellView *cellview;
   GtkCellRenderer *renderer;
-  GValue value = {0, };
+  GValue value = G_VALUE_INIT;
 
   cellview = GTK_CELL_VIEW (gtk_cell_view_new ());
 
index 7ada895fc4dabe113874a19e401b83f96b49e3b1..b950b71b42358a5fbdcfd6aab22fd2944bb7cb62 100644 (file)
@@ -553,7 +553,7 @@ gtk_container_buildable_set_child_property (GtkContainer *container,
                                             const gchar  *value)
 {
   GParamSpec *pspec;
-  GValue gvalue = { 0, };
+  GValue gvalue = G_VALUE_INIT;
   GError *error = NULL;
 
   pspec = gtk_container_class_find_child_property
@@ -847,7 +847,7 @@ container_set_child_property (GtkContainer       *container,
                               const GValue       *value,
                               GObjectNotifyQueue *nqueue)
 {
-  GValue tmp_value = { 0, };
+  GValue tmp_value = G_VALUE_INIT;
   GtkContainerClass *class = g_type_class_peek (pspec->owner_type);
 
   /* provide a copy to work from, convert (if necessary) and validate */
@@ -903,7 +903,7 @@ gtk_container_child_get_valist (GtkContainer *container,
   name = first_property_name;
   while (name)
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       GParamSpec *pspec;
       gchar *error;
 
@@ -983,7 +983,7 @@ gtk_container_child_get_property (GtkContainer *container,
                G_OBJECT_TYPE_NAME (container));
   else
     {
-      GValue *prop_value, tmp_value = { 0, };
+      GValue *prop_value, tmp_value = G_VALUE_INIT;
 
       /* auto-conversion of the callers value type
        */
@@ -1047,7 +1047,7 @@ gtk_container_child_set_valist (GtkContainer *container,
   name = first_property_name;
   while (name)
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       gchar *error = NULL;
       GParamSpec *pspec = g_param_spec_pool_lookup (_gtk_widget_child_property_pool,
                                                     name,
index 35467490fd0e162b32d8f029a3abbd3d1751f05b..7035da484fb3aee33a3051055974894218add429 100644 (file)
@@ -1285,7 +1285,7 @@ attribute_from_text (GtkBuilder   *builder,
   PangoLanguage  *language;
   PangoFontDescription *font_desc;
   GdkColor       *color;
-  GValue          val = { 0, };
+  GValue          val = G_VALUE_INIT;
 
   if (!gtk_builder_value_from_string_type (builder, PANGO_TYPE_ATTR_TYPE, name, &val, error))
     return NULL;
@@ -1441,7 +1441,7 @@ pango_start_element (GMarkupParseContext *context,
                     GError             **error)
 {
   PangoParserData *data = (PangoParserData*)user_data;
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
   guint i;
   gint line_number, char_number;
 
index 9fd2dca40b5c6b79538bd4fbf55265f7fb19a2df..907b50e990a6e17b59039d1be3a159657d5e0c23 100644 (file)
@@ -838,7 +838,7 @@ gtk_list_store_real_set_value (GtkListStore *list_store,
   GtkTreeDataList *list;
   GtkTreeDataList *prev;
   gint old_column = column;
-  GValue real_value = {0, };
+  GValue real_value = G_VALUE_INIT;
   gboolean converted = FALSE;
   gboolean retval = FALSE;
 
@@ -1036,7 +1036,7 @@ gtk_list_store_set_valist_internal (GtkListStore *list_store,
 
   while (column != -1)
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       gchar *error = NULL;
 
       if (column < 0 || column >= priv->n_columns)
index e237fa76ba88b5a7eeaadb6a519b93692f5adea4..451b3fbf5f0b532fee77fa899798581aea194f27 100644 (file)
@@ -510,7 +510,7 @@ display_opened_cb (GdkDisplayManager *display_manager,
   
   for (i = 0; i < gdk_display_get_n_screens (display); i++)
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
 
       g_value_init (&value, G_TYPE_STRING);
 
index 4effb04f0cd6a7cf599eecbae201376b464b96d7..69c54e40d0f3c7ea37dfb6c9592d112b76e3d1dc 100644 (file)
@@ -1637,7 +1637,7 @@ marks_start_element (GMarkupParseContext *context,
             msg_context = values[i];
           else if (strcmp (names[i], "value") == 0)
             {
-              GValue gvalue = { 0, };
+              GValue gvalue = G_VALUE_INIT;
 
               if (!gtk_builder_value_from_string_type (parser_data->builder, G_TYPE_DOUBLE, values[i], &gvalue, error))
                 return;
@@ -1647,7 +1647,7 @@ marks_start_element (GMarkupParseContext *context,
             }
           else if (strcmp (names[i], "position") == 0)
             {
-              GValue gvalue = { 0, };
+              GValue gvalue = G_VALUE_INIT;
 
               if (!gtk_builder_value_from_string_type (parser_data->builder, GTK_TYPE_POSITION_TYPE, values[i], &gvalue, error))
                 return;
index bd3157ad19f427b22cc765ca0e10986e3fd3a1e5..b6c10f4294031f225ba57d2bb436cbcc8b249830 100644 (file)
@@ -873,7 +873,7 @@ gtk_scale_button_screen_changed (GtkWidget *widget,
   GtkScaleButton *button = (GtkScaleButton *) widget;
   GtkScaleButtonPrivate *priv;
   GdkScreen *screen;
-  GValue value = { 0, };
+  GValue value = G_VALUE_INIT;
 
   if (gtk_widget_has_screen (widget) == FALSE)
     return;
index 495b6851da9da73e74c5fd0d8426a025676fa9a1..a312d2219a19326e0248c105174f0a8a88262393 100644 (file)
@@ -1583,7 +1583,7 @@ gtk_settings_get_property (GObject     *object,
     }
   else
     {
-      GValue val = { 0, };
+      GValue val = G_VALUE_INIT;
 
       /* Try to get xsetting as a string and parse it. */
 
@@ -1596,8 +1596,8 @@ gtk_settings_get_property (GObject     *object,
         }
       else
         {
-          GValue tmp_value = { 0, };
-          GValue gstring_value = { 0, };
+          GValue tmp_value = G_VALUE_INIT;
+          GValue gstring_value = G_VALUE_INIT;
           GtkRcPropertyParser parser = (GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser);
 
           g_value_init (&gstring_value, G_TYPE_GSTRING);
@@ -1759,7 +1759,7 @@ apply_queued_setting (GtkSettings             *settings,
                       GtkSettingsValuePrivate *qvalue)
 {
   GtkSettingsPrivate *priv = settings->priv;
-  GValue tmp_value = { 0, };
+  GValue tmp_value = G_VALUE_INIT;
   GtkRcPropertyParser parser = (GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser);
 
   g_value_init (&tmp_value, G_PARAM_SPEC_VALUE_TYPE (pspec));
@@ -2411,7 +2411,7 @@ _gtk_settings_handle_event (GdkEventSetting *event)
 
       if (property_id == PROP_COLOR_SCHEME)
         {
-          GValue value = { 0, };
+          GValue value = G_VALUE_INIT;
 
           g_value_init (&value, G_TYPE_STRING);
           if (!gdk_screen_get_setting (screen, pspec->name, &value))
@@ -2699,7 +2699,7 @@ settings_update_color_scheme (GtkSettings *settings)
     {
       GtkSettingsPrivate *priv = settings->priv;
       ColorSchemeData *data;
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
 
       data = g_slice_new0 (ColorSchemeData);
       data->color_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
index 24837d55dc1d830f0888a3507a9cc98223b90b2f..f3946f86598e9af4a96543e08ff56e92a2e9584f 100644 (file)
@@ -584,7 +584,7 @@ gtk_style_properties_set_valist (GtkStyleProperties *props,
     {
       const GtkStyleProperty *node;
       gchar *error = NULL;
-      GValue val = { 0 };
+      GValue val = G_VALUE_INIT;
 
       node = _gtk_style_property_lookup (property_name);
 
@@ -756,7 +756,7 @@ gtk_style_properties_get_valist (GtkStyleProperties *props,
         }
       else if (_gtk_style_property_is_shorthand (node))
         {
-          GValue packed = { 0 };
+          GValue packed = G_VALUE_INIT;
 
           g_value_init (&packed, node->pspec->value_type);
           _gtk_style_property_pack (node, props, state, &packed);
@@ -765,7 +765,7 @@ gtk_style_properties_get_valist (GtkStyleProperties *props,
         }
       else
         {
-          GValue default_value = { 0 };
+          GValue default_value = G_VALUE_INIT;
 
           g_value_init (&default_value, node->pspec->value_type);
           _gtk_style_property_default_value (node, props, state, &default_value);
index 35280787f427c457d8f54a4366da1cb876474695..05ffbf3426aceac83a890b1bb3118851306e8aff 100644 (file)
@@ -1201,7 +1201,7 @@ border_image_value_parse (GtkCssParser *parser,
                           GFile *base,
                           GValue *value)
 {
-  GValue temp = { 0, };
+  GValue temp = G_VALUE_INIT;
   cairo_pattern_t *pattern = NULL;
   GtkGradient *gradient = NULL;
   GtkBorder slice, *width = NULL, *parsed_slice;
index e4b4f730060ad2c05ad7d6a5f4b065505d2b8d6f..c750a80f0a2568db665d59aedd78ee4145873745 100644 (file)
@@ -54,7 +54,7 @@ serialize_value (GValue *value)
 {
   if (g_value_type_transformable (value->g_type, G_TYPE_STRING))
     {
-      GValue text_value = { 0 };
+      GValue text_value = G_VALUE_INIT;
       gchar *tmp;
 
       g_value_init (&text_value, G_TYPE_STRING);
@@ -85,7 +85,7 @@ deserialize_value (const gchar *str,
 {
   if (g_value_type_transformable (G_TYPE_STRING, value->g_type))
     {
-      GValue text_value = { 0 };
+      GValue text_value = G_VALUE_INIT;
       gboolean retval;
 
       g_value_init (&text_value, G_TYPE_STRING);
@@ -313,7 +313,7 @@ serialize_tag (gpointer key,
 
   for (i = 0; i < n_pspecs; i++)
     {
-      GValue value = { 0 };
+      GValue value = G_VALUE_INIT;
       gchar *tmp, *tmp2;
 
       if (!(pspecs[i]->flags & G_PARAM_READABLE) ||
@@ -1164,7 +1164,7 @@ parse_attr_element (GMarkupParseContext  *context,
 {
   const gchar *name, *type, *value;
   GType gtype;
-  GValue gvalue = { 0 };
+  GValue gvalue = G_VALUE_INIT;
   GParamSpec *pspec;
 
   g_assert (peek_state (info) == STATE_TAG);
index b9c4de0dfaab8ff7c3f9dee0a4eef1ed060d17b7..28ee29cfc43e354df9c9798207b8a8202f999293 100644 (file)
@@ -326,8 +326,8 @@ _gtk_tree_data_list_compare_func (GtkTreeModel *model,
 {
   gint column = GPOINTER_TO_INT (user_data);
   GType type = gtk_tree_model_get_column_type (model, column);
-  GValue a_value = {0, };
-  GValue b_value = {0, };
+  GValue a_value = G_VALUE_INIT;
+  GValue b_value = G_VALUE_INIT;
   gint retval;
   const gchar *stra, *strb;
 
index 32b0626d4d908c205ec5980c8ce70a04b7101119..584e3512f8331105a05d3419f782d58c7ff637f3 100644 (file)
@@ -1754,7 +1754,7 @@ gtk_tree_model_get_valist (GtkTreeModel *tree_model,
 
   while (column != -1)
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       gchar *error = NULL;
 
       if (column >= gtk_tree_model_get_n_columns (tree_model))
index daa490bdabdc6de4483344bbeec94a940e7992b7..d3877a57af70fe8baf40091a93d47b6e3ef21428 100644 (file)
@@ -1264,7 +1264,7 @@ gtk_tree_model_filter_real_visible (GtkTreeModelFilter *filter,
     }
   else if (filter->priv->visible_column >= 0)
    {
-     GValue val = {0, };
+     GValue val = G_VALUE_INIT;
 
      gtk_tree_model_get_value (child_model, child_iter,
                                filter->priv->visible_column, &val);
index c8ffb9cdd52bceed7fcc1042399d90d81956be37..c427f2c2fdaa606b013f23d34b8d3a583f7a3bb9 100644 (file)
@@ -849,7 +849,7 @@ gtk_tree_store_real_set_value (GtkTreeStore *tree_store,
   GtkTreeDataList *list;
   GtkTreeDataList *prev;
   gint old_column = column;
-  GValue real_value = { 0, };
+  GValue real_value = G_VALUE_INIT;
   gboolean converted = FALSE;
   gboolean retval = FALSE;
 
@@ -1040,7 +1040,7 @@ gtk_tree_store_set_valist_internal (GtkTreeStore *tree_store,
 
   while (column != -1)
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       gchar *error = NULL;
 
       if (column < 0 || column >= priv->n_columns)
index fe5f5983861c64a81b975396fcb4026f08c0e1e6..f7c54446828c8ce08dda0fdaaa94967ce366a6db 100644 (file)
@@ -15300,8 +15300,8 @@ gtk_tree_view_search_equal_func (GtkTreeModel *model,
   gchar *normalized_key;
   gchar *case_normalized_string = NULL;
   gchar *case_normalized_key = NULL;
-  GValue value = {0,};
-  GValue transformed = {0,};
+  GValue value = G_VALUE_INIT;
+  GValue transformed = G_VALUE_INIT;
 
   gtk_tree_model_get_value (model, iter, column, &value);
 
@@ -16329,8 +16329,8 @@ gtk_tree_view_set_tooltip_query_cb (GtkWidget  *widget,
                                    GtkTooltip *tooltip,
                                    gpointer    data)
 {
-  GValue value = { 0, };
-  GValue transformed = { 0, };
+  GValue value = G_VALUE_INIT;
+  GValue transformed = G_VALUE_INIT;
   GtkTreeIter iter;
   GtkTreePath *path;
   GtkTreeModel *model;
index 3abc5b1ed75b56d3bf7463a68f791aab76e1966f..082b69a12a2c01babd2d9c7187670a50f11ddff5 100644 (file)
@@ -1721,7 +1721,7 @@ test_window (void)
 static void
 test_value_from_string (void)
 {
-  GValue value = { 0 };
+  GValue value = G_VALUE_INIT;
   GError *error = NULL;
   GtkBuilder *builder;
 
index 22301a16f2b4bf28a12382017568123d15b2276e..5392de9b4a2c23bb0bd8d4daf9841f71c7230559 100644 (file)
@@ -27,7 +27,7 @@ check_property (const char *output,
                GParamSpec *pspec,
                GValue *value)
 {
-  GValue default_value = { 0, };
+  GValue default_value = G_VALUE_INIT;
   char *v, *dv, *msg;
 
   if (g_param_value_defaults (pspec, value))
@@ -103,7 +103,7 @@ test_type (gconstpointer data)
   for (i = 0; i < n_pspecs; ++i)
     {
       GParamSpec *pspec = pspecs[i];
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       
       if (pspec->owner_type != type)
        continue;
@@ -298,7 +298,7 @@ test_type (gconstpointer data)
       for (i = 0; i < n_pspecs; ++i)
        {
          GParamSpec *pspec = pspecs[i];
-         GValue value = { 0, };
+         GValue value = G_VALUE_INIT;
          
          if (pspec->owner_type != type)
            continue;
index 4a38f005fee92b9d11623f27f78a55a9e3333dd8..6fda7722d73ec862d2c166f22a5e1bd06bc07a32 100644 (file)
@@ -212,7 +212,7 @@ object_test_property (GObject           *object,
   if (pspec->flags & G_PARAM_WRITABLE &&
       !(pspec->flags & (G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY)))
     {
-      GValue value = { 0, };
+      GValue value = G_VALUE_INIT;
       guint i;
       const IgnoreProperty *ignore_properties;
       /* select value to set */
index 09019978f060838d0bcb9f01a6f54589c3cfc99b..b2c79f85eeaaf0f710ac4153872266ea97f54911 100644 (file)
@@ -426,8 +426,8 @@ dump_atk_value (AtkValue *atk_value,
                 guint     depth,
                 GString  *string)
 {
-  GValue value = { 0, };
-  GValue svalue = { 0, };
+  GValue value = G_VALUE_INIT;
+  GValue svalue = G_VALUE_INIT;
 
   g_string_append_printf (string, "%*s<AtkValue>\n", depth, "");
 
index 1abac9537757ed925e2ec44a5a0b9cd55bf6402d..22a6c893b38a93d2a4ecfd75f43521c008902bd0 100644 (file)
@@ -184,7 +184,7 @@ static void
 int_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkAdjustment *adj = GTK_ADJUSTMENT (data);
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
 
   g_value_init (&val, G_TYPE_INT);
 
@@ -221,7 +221,7 @@ static void
 uint_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkAdjustment *adj = GTK_ADJUSTMENT (data);
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
 
   g_value_init (&val, G_TYPE_UINT);
   get_property_value (object, pspec, &val);
@@ -257,7 +257,7 @@ static void
 float_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkAdjustment *adj = GTK_ADJUSTMENT (data);
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
 
   g_value_init (&val, G_TYPE_FLOAT);
   get_property_value (object, pspec, &val);
@@ -293,7 +293,7 @@ static void
 double_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkAdjustment *adj = GTK_ADJUSTMENT (data);
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
 
   g_value_init (&val, G_TYPE_DOUBLE);
   get_property_value (object, pspec, &val);
@@ -332,7 +332,7 @@ static void
 string_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkEntry *entry = GTK_ENTRY (data);
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
   const gchar *str;
   const gchar *text;
 
@@ -377,7 +377,7 @@ bool_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkToggleButton *tb = GTK_TOGGLE_BUTTON (data);
   GtkWidget *child;
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
 
   g_value_init (&val, G_TYPE_BOOLEAN);
   get_property_value (object, pspec, &val);
@@ -425,7 +425,7 @@ static void
 enum_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkComboBox *cb = GTK_COMBO_BOX (data);
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
   GEnumClass *eclass;
   gint i;
 
@@ -499,7 +499,7 @@ static void
 flags_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GList *children, *c;
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
   GFlagsClass *fclass;
   guint flags;
   gint i;
@@ -559,7 +559,7 @@ unichar_changed (GObject *object, GParamSpec *pspec, gpointer data)
   GtkEntry *entry = GTK_ENTRY (data);
   gunichar new_val;
   gunichar old_val = unichar_get_value (entry);
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
   gchar buf[7];
   gint len;
 
@@ -684,7 +684,7 @@ static void
 color_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkColorButton *cb = GTK_COLOR_BUTTON (data);
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
   GdkRGBA *color;
   GdkRGBA cb_color;
 
@@ -730,7 +730,7 @@ static void
 font_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkFontChooser *fb = GTK_FONT_CHOOSER (data);
-  GValue val = { 0, };
+  GValue val = G_VALUE_INIT;
   const PangoFontDescription *font_desc;
   PangoFontDescription *fb_font_desc;
 
index 943a7653a1ecb698631feb7ccc2bdc416b635db2..2680f96968af5f9f16cd8523a5e647e4d5230fbb 100644 (file)
@@ -6077,7 +6077,7 @@ void
 toggle_resize (GtkWidget *widget, GtkWidget *child)
 {
   GtkContainer *container = GTK_CONTAINER (gtk_widget_get_parent (child));
-  GValue value = { 0, };
+  GValue value = G_VALUE_INIT;
   g_value_init (&value, G_TYPE_BOOLEAN);
   gtk_container_child_get_property (container, child, "resize", &value);
   g_value_set_boolean (&value, !g_value_get_boolean (&value));
@@ -6088,7 +6088,7 @@ void
 toggle_shrink (GtkWidget *widget, GtkWidget *child)
 {
   GtkContainer *container = GTK_CONTAINER (gtk_widget_get_parent (child));
-  GValue value = { 0, };
+  GValue value = G_VALUE_INIT;
   g_value_init (&value, G_TYPE_BOOLEAN);
   gtk_container_child_get_property (container, child, "shrink", &value);
   g_value_set_boolean (&value, !g_value_get_boolean (&value));
index 82c79496bfa3574773bdc50fe291feaec575a390..0c145837205806e80265e9121c1885fe2558066c 100644 (file)
@@ -364,7 +364,7 @@ iter_compare_func (GtkTreeModel *model,
                   GtkTreeIter  *b,
                   gpointer      user_data)
 {
-  GValue a_value = { 0, }, b_value = { 0, };
+  GValue a_value = G_VALUE_INIT, b_value = G_VALUE_INIT;
   GtkAction *a_action, *b_action;
   const gchar *a_name, *b_name;
   gint retval = 0;